package com.wm.blog_admin.feign.fallback;

import com.wm.blog_admin.feign.PictureFeignClient;
import com.wm.blog_common.domain.TFileDO;
import com.wm.blog_common.entity.TFile;
import com.wm.blog_common.req.TFileQuery;
import com.wm.blog_common.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 日志断路器实现   todo
 *
 * @author wm_yu
 * @date 2019/04/02
 */
@Slf4j
@Component
public class PictureClientFallbackImpl implements PictureFeignClient {
    @Override
    public Result<TFileDO> get(Long id) {
        return Result.failure(null);
    }

    @Override
    public Result<List<TFile>> getByIdList(List<Long> idList) {
        return Result.failure(null);
    }

    @Override
    public Result<String> uploadFile(MultipartFile file) {
        return Result.failure();
    }


    private Throwable throwable;

    public Throwable getThrowable() {
        return throwable;
    }

    public void setThrowable(Throwable throwable) {
        this.throwable = throwable;
    }
}
